package by.yakusekmaxim.bookgid.dataaccess;

import java.util.List;

import javax.persistence.metamodel.SingularAttribute;

import by.yakusekmaxim.bookgid.dataaccess.util.Filter;
import by.yakusekmaxim.bookgid.datamodel.Book;
import by.yakusekmaxim.bookgid.datamodel.UserAccount;
import by.yakusekmaxim.bookgid.datamodel.UserAccount2Book;

public interface UserAccount2BookDao extends
		AbstractDao<Long, UserAccount2Book> {

	List<UserAccount2Book> getAllUserAccount2BookDao(
			SingularAttribute<UserAccount2Book, ?> attribute,
			boolean ascending, int startRecord, int pageSize, UserAccount user);

	List<UserAccount2Book> getAllUserAccount2BookDao(
			SingularAttribute<UserAccount2Book, ?> attribute,
			boolean ascending, int startRecord, int pageSize,
			Filter<UserAccount2Book> filter, UserAccount user);

	List<UserAccount2Book> getUserAccount2BookDao(Book book, UserAccount user);

	Long getCountByUserAccount(UserAccount user);

	Long getCountByUserAccount(Filter<UserAccount2Book> filter, UserAccount user);

	Long getCountByBook(Filter<UserAccount2Book> filter, Book book);
}
